Skip to content

RAID scrubbing#64

Open
Emmankoko wants to merge 2 commits intoNetBSD:trunkfrom
Emmankoko:raid
Open

RAID scrubbing#64
Emmankoko wants to merge 2 commits intoNetBSD:trunkfrom
Emmankoko:raid

Conversation

@Emmankoko
Copy link

will be working on this with Greg Oster. external reviews are welcome.

ricardobranco777 pushed a commit to ricardobranco777/netbsd-src that referenced this pull request Feb 14, 2026
ricardobranco777 pushed a commit to ricardobranco777/netbsd-src that referenced this pull request Feb 14, 2026
…D#64):

	sys/dev/pci/pvscsi.c: revision 1.4
	sys/dev/pci/pvscsi.c: revision 1.5

pvscsi(4): Use bus_dmamap_sync, not membar_*, for DMA.
membar_* may be a noop if we're booting on a single _virtual_ CPU,
but the barriers are still needed in case the host behind pvscsi(4)
is running on another _physical_ CPU.

Prompted by (and related to but not the same issue as):
PR kern/59618: occasional virtio block device lock ups/hangs


pvscsi(4): Zero rings before using them.

bus_dmamem_alloc(9) doesn't guarantee zeroing, as far as I can tell,
and who knows what might happen if the ring header and contents have
anything nonzero initially.

Insert an initial preread/prewrite sync between zeroing and first
use, and, out of paranoia, a final postread/postwrite sync between
last use and unload/free.

Prompted by (but not really related to):
PR kern/59618: occasional virtio block device lock ups/hangs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant